'use client'

import {useEffect} from 'react'

export default function RootPage() {
  useEffect(() => {
    const token = localStorage.getItem('token')
    if (token) {
      window.location.href = '/home'
    } else {
      window.location.href = '/login'
    }
  }, [])

  return null
} 